<template>
  <div class="fenlei">
    <van-tree-select
      height="100%"
      :items="speciesList"
      :main-active-index.sync="active"
     
    >
    <template #content>
      <div v-if="active === 1">
        这是第一个
      </div>
    </template>
    </van-tree-select>
  </div>
</template>

<script>
import axios from 'axios'
import {speciesList} from '@/utils/classification.js'
export default {
   data() {
    return {
      active: 0,
      speciesList:speciesList
    };
   },
   mounted(){
      axios.get("http://localhost:3000/")
        .then(res=>{
           console.log(res);
        })
   },
   methods:{
     onchange(v){
       console.log(v);
     }
   }
}

</script>

<style lang="scss" scoped>
  .fenlei{
    margin-top: 60px;
    height: 100%;
    img{
       width:100px;
       height: 100px;
    }
    .van-sidebar { 
            position: fixed;
            left: 0;
            top: 50px;
            bottom: 0;
            width: 100px;
            background: #fff;
            overflow-x: hidden;
            overflow-y: scroll;
    }
  }
  .category-content{
    position: fixed;
    top: 50px;
    left: 68px;
    right: 0;
    bottom: 10px;
    padding: 10px;
    overflow-x: hidden;
    overflow-y: scroll;
  }
</style>